<%@ page import="java.io.InputStreamReader,java.io.IOException,java.io.PrintWriter,java.sql.ResultSet,
java.util.ArrayList,javax.servlet.ServletException,javax.servlet.annotation.WebServlet,javax.servlet.http.HttpServlet,

javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,org.apache.log4j.Logger,com.grantha.util.DB,com.mysql.jdbc.Connection
,com.mysql.jdbc.PreparedStatement" %>

<!DOCTYPE html>

<html>
<head>
<jsp:include page="/jsp/header.jsp" />
<title>Delete A User</title>

</head>
<body>

<div class="page" style="margin-top: 0px;">
	<div id="navibar">
    <ul>
        <li onclick="javascript:doOverlayOpen('${WEB_BASE }jsp/Users/MAddUser.jsp')"><a href="#"> Add </a></li>
		<li><a class="homepg" href="#">Delete</a></li>
        <li onclick="javascript:doOverlayOpen('${WEB_BASE }jsp/Users/ChangePassword.jsp')"><a href="#">Change Password</a></li>
    </ul>
     </div><br/><br/><br/><br/>
     <form id="adduserForm" action="${WEB_BASE}DeleteUserServlet" novalidate="novalidate">
<div id="DeleteUser"><table class="tab">
		<tr><td class="letters"> Select a User:</td>
		    <td>
				<select id="ComboBox" name="users" class="required">
               
				<!--  <option value="" selected="selected"></option>
				<option value="administrator"></option>
				<option value="operator"></option>
				</select> -->
				
				
    <%
        try {
        

        	 ResultSet rs = DB.search("select username from users", null);
 	        while(rs.next()) {
 	        	
 	        	out.write("<option value=" + rs.getString("username")+ ">" +rs.getString("username")  + "</option>");
 	        	
 	        }
 	        
        
        rs.close();
        
        } 

        catch(Exception e) {
            System.err.print("Sorry");
                           }
%>
</select>
				
				</td></tr>
		<tr><td></td><td><input id="Button" type="submit" value="Delete"/></td></tr>
	</table></div></form></div>
   <jsp:include page="/jsp/footer.jsp" />
</body>

</html>